%% plot Disturbance Observer

figure(2)
set(gcf, 'color', 'white'),     %set background of current plot figure to white
subplot(2,1,1)
plot(TLref_stepTL_comp, 'k--'), hold on,
plot(TLest_stepTL, 'r'), hold on,
plot(TLest_stepTL_comp, 'b'),
grid on,
axis([0 0.3 -0.02 0.16]),
xlabel('t(s)'),
ylabel('Disturbance(Nm)'),

% subplot(2,1,2)
figure(3)
% plot(wmref_stepTL, 'k--'), hold on,
plot(wm_stepTL, 'r--'), hold on,
plot(wm_stepTL_comp, 'b'),
grid on,
axis([0.1 0.2 700 1200]),
xlabel('t(s)'),
ylabel('Speed(rpm)'),
% p1 = find(abs(wm_L_050.Time-0.2051)<1e-6)
% text(wm_L_050.Time(p1)-0.005,wm_L_050.data(p1)+10, 'o', 'color', 'b');
% text(wm_L_050.Time(p1)-0.07,wm_L_050.data(p1)-200,['(',num2str(wm_L_050.Time(p1)),', ',num2str(round(wm_L_050.data(p1))),')']);
% p2 = find(abs(wm_L_050.Time-0.28)<1e-6)
% text(wm_L_050.Time(p2),wm_L_050.data(p2)+2, 'o', 'color', 'b');
% text(wm_L_050.Time(p2)-0.04,wm_L_050.data(p2)+18,['(',num2str(wm_L_050.Time(p2)),', ',num2str(wm_L_050.data(p2)),')']);
% p3 = find(abs(wm_L_050.Time-0.2)<50e-6)
% text(wm_L_050.Time(p3)-0.005,wm_L_050.data(p3)+4, 'o', 'color', 'b');
% text(wm_L_050.Time(p3)+0.005,wm_L_050.data(p3)+5,['(',num2str(wm_L_050.Time(p3)),', ',num2str(wm_L_050.data(p3)),')']);


